﻿using Microsoft.Extensions.Configuration;
using MiniFox.Net.Ftp;

namespace MiniFox.Net.Configurations
{
    /// <summary>
    /// 
    /// </summary>
    public sealed class FtpAdapterSetting : IFtpAdapterSetting
    {
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("name")]
        public string Name
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("host")]
        public string Host
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("port")]
        public int Port
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("ssl")]
        public bool SSL
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("username")]
        public string UserName
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("password")]
        public string Password
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("serviceType")]
        public string ServiceType
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("logger")]
        public string Logger
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>    
        [ConfigurationKeyName("services")]
        public ServiceSettingCollection ServiceSettings
        {
            get;
            set;
        } = new();

        IServiceSettingCollection IAdapterSetting.ServiceSettings
        {
            get { return this.ServiceSettings; }
        }
    }
}
